package org.example.controller;

import org.example.service.IDemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("demo")
public class DemoController {
    @Resource
    private IDemoService demoService;


    @GetMapping("index")
    public String index(String body){
        return body;
    }

    @GetMapping("getName")
    public String getName(){
        return demoService.getName();
    }
}
